feat(python): Support downloading manylinux2010 and manylinux2014 #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
Description of changes:
Some details are here: aws/aws-sam-cli#2014 (comment)
Previously for Python functions, we would only download manylinux1 whls. More details can be found in PEP 513, but manylinux1 whls support x86_64 linux platforms that have glibc 2.5 or greater. Over time, Python introduced 2 more manylinux versions (manylinux2010 (PEP 571)[https://www.python.org/dev/peps/pep-0571/] and manylinux2014 PEP 599. Looking at manylinux2014 platform detection, a platform supports manylinux2014 if it is linux-x86_64 (among other but this is the one we care about) and has a glibc 2.17 or newer. As far as I know, AWS Lambda doesn't package a _manylinux module so I have skipped over that validation parts. Doing a quick check on AWS Lambda, all the glibc versions are 2.17 or greater and is an x86_64 platform. So AWS Lambda can support manylinux2014.
Now looking at the backwards compatible of manylinux2014, PEP 599 states that "As a result, manylinux1 and manylinux2010 wheels are considered manylinux2014 wheels. A pip that recognizes the manylinux2014 platform tag will thus install manylinux2010 wheels for manylinux2014 platforms -- even when explicitly set -- when no manylinux2014 wheels are available." So if a platform is compatible with manylinux2014, it is also compatible with manylinux2010 and manylinux1. This allows us to also support manylinux2010 whls.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.